Skip to content

chore(standards): synced file(s) with hallelx2/dev-standards - #7

Open
hallelx2 wants to merge 10 commits into
mainfrom
repo-sync/dev-standards/default
Open

chore(standards): synced file(s) with hallelx2/dev-standards#7
hallelx2 wants to merge 10 commits into
mainfrom
repo-sync/dev-standards/default

Conversation

@hallelx2

@hallelx2 hallelx2 commented Jun 13, 2026

Copy link
Copy Markdown
Owner

synced local file(s) with hallelx2/dev-standards.

Changed files
  • created local AGENTS.md from remote AGENTS.md
  • created local .github/copilot-instructions.md from remote .github/copilot-instructions.md
  • created local directory .github/agents/ and copied all sub files/folders from remote directory .github/agents/
  • created local .github/instructions/backend.instructions.md from remote .github/instructions/backend.instructions.md
  • created local .github/instructions/frontend.instructions.md from remote .github/instructions/frontend.instructions.md
  • created local .github/instructions/security.instructions.md from remote .github/instructions/security.instructions.md
  • created local .github/workflows/security.yml from remote .github/workflows/security.yml
  • created local .github/workflows/security.reusable.yml from remote .github/workflows/security.reusable.yml
  • created local .github/workflows/jules-review.yml from remote .github/workflows/jules-review.yml
  • created local .github/dependabot.yml from remote .github/dependabot.yml

This PR was created automatically by the repo-file-sync-action workflow run #30801469164

Summary by CodeRabbit

  • New Features

    • Added automated security scanning for pull requests and changes to the main branch.
    • Added specialized review guidance for backend, frontend, security, and test reliability checks.
    • Added automated dependency update monitoring for supported ecosystems.
    • Added shared engineering and security standards for consistent repository reviews.
  • Documentation

    • Documented review criteria, testing expectations, secure secret handling, and tenant isolation practices.

Copilot AI review requested due to automatic review settings June 13, 2026 02:11
@sourcery-ai

sourcery-ai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds standardized AI agent configuration, review rubrics, and security workflows by syncing repo with hallelx2/dev-standards. This introduces AGENTS.md, Copilot instructions, specialized agent configs, path-scoped review instructions, and reusable GitHub Actions for security scanning and optional Jules-based PR security review.

Sequence diagram for jules-review GitHub Action on PRs

sequenceDiagram
  actor Dev
  participant GitHub
  participant jules_review_workflow as jules-review_workflow
  participant guard_step as guard_step
  participant jules_pr_reviewer as sanjay3290/jules-pr-reviewer
  participant Jules_API

  Dev->>GitHub: open/synchronize PR
  GitHub->>jules_review_workflow: trigger pull_request event
  jules_review_workflow->>guard_step: run Guard step
  guard_step-->>jules_review_workflow: outputs enabled=true/false

  alt JULES_API_KEY present
    jules_review_workflow->>jules_pr_reviewer: run Jules security review
    jules_pr_reviewer->>Jules_API: call with jules-api-key and review-prompt
    Jules_API-->>jules_pr_reviewer: security review result
    jules_pr_reviewer-->>GitHub: post review comments on PR
  else JULES_API_KEY missing
    jules_review_workflow-->>GitHub: log skip message
  end
Loading

File-Level Changes

Change Details Files
Introduce repo-wide AGENTS brief and baseline Copilot review rubric for AI agents.
  • Add AGENTS.md describing AI agent expectations, workflow conventions, and security priorities for the Vectorless codebase.
  • Add .github/copilot-instructions.md defining Copilot’s PR review order and focus areas (right thing, done right, security).
AGENTS.md
.github/copilot-instructions.md
Add specialized AI reviewer agents for backend, frontend, security, and test reliability.
  • Define backend-reviewer agent focused on Go correctness, concurrency, and API/data-layer behavior.
  • Define frontend-reviewer agent focused on Next.js/TypeScript boundaries, XSS, accessibility, performance, and brand consistency.
  • Define security-reviewer agent focused on OWASP-style vulnerabilities, multi-tenant isolation, BYOK handling, injection, and crypto issues.
  • Define test-reliability-reviewer agent focused on test coverage, determinism, and reliability guarantees.
.github/agents/backend-reviewer.agent.md
.github/agents/frontend-reviewer.agent.md
.github/agents/security-reviewer.agent.md
.github/agents/test-reliability-reviewer.agent.md
Add path-scoped review instruction rubrics for backend, frontend, and security checks.
  • Introduce backend.instructions.md applying Go-specific review guidance to all .go files.
  • Introduce frontend.instructions.md applying TypeScript/Next.js/a11y guidance to TS/TSX/CSS files.
  • Introduce security.instructions.md applying security review expectations across all files.
.github/instructions/backend.instructions.md
.github/instructions/frontend.instructions.md
.github/instructions/security.instructions.md
Add reusable security scanning workflow and caller workflow for CI.
  • Create security.reusable.yml defining gitleaks secret scan, Trivy filesystem scan for vulnerabilities/misconfig/secrets, and conditional Go SAST via gosec.
  • Create security.yml workflow that runs on PRs and main pushes and invokes the reusable security workflow with inherited secrets.
.github/workflows/security.reusable.yml
.github/workflows/security.yml
Add optional automated Jules-based security review workflow for pull requests.
  • Add jules-review.yml workflow that triggers on PR events, conditionally runs only when JULES_API_KEY is configured, and invokes sanjay3290/jules-pr-reviewer with a security-focused prompt tied to the security-reviewer agent spec.
.github/workflows/jules-review.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added repository review standards, specialized AI reviewer agents, Dependabot updates, and GitHub Actions workflows for security scanning and Jules security reviews.

Changes

Repository governance and security automation

Layer / File(s) Summary
Shared review guidance
AGENTS.md, .github/copilot-instructions.md, .github/instructions/*
Added repository-wide engineering, review, backend, frontend, and security instructions.
Specialized review agents
.github/agents/*
Added backend, frontend, security, and test-reliability reviewer configurations with scoped checks and citation requirements.
Security workflow execution
.github/workflows/*, .github/dependabot.yml
Added pull request and push security workflows, reusable scanners for multiple ecosystems, conditional Jules reviews, and weekly dependency updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies a standards synchronization from hallelx2/dev-standards, which matches the primary changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch repo-sync/dev-standards/default

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In .github/workflows/security.reusable.yml, consider pinning third-party actions like gitleaks/gitleaks-action@v2 and aquasecurity/trivy-action@0.28.0 to specific commit SHAs rather than tags to reduce supply-chain risk.
  • In the go-sast job, securego/gosec@master is tracking a moving branch; using a tagged release or commit SHA would make the workflow behavior more deterministic and auditable.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `.github/workflows/security.reusable.yml`, consider pinning third-party actions like `gitleaks/gitleaks-action@v2` and `aquasecurity/trivy-action@0.28.0` to specific commit SHAs rather than tags to reduce supply-chain risk.
- In the `go-sast` job, `securego/gosec@master` is tracking a moving branch; using a tagged release or commit SHA would make the workflow behavior more deterministic and auditable.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from 1ac2a93 to 1d756e1 Compare June 13, 2026 02:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR syncs shared AI agent guidance and security automation from hallelx2/dev-standards into the pdftable repository, standardizing how automated reviewers operate and adding baseline security scanning workflows.

Changes:

  • Adds a repo-level AI agent brief (AGENTS.md) plus baseline Copilot review instructions.
  • Introduces specialized agent profiles and path-scoped review rubrics for backend/frontend/security.
  • Adds a reusable security scanning workflow (gitleaks, Trivy, gosec) and an optional Jules PR review workflow.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
AGENTS.md Adds shared agent brief and engineering/review standards for the repo.
.github/copilot-instructions.md Defines baseline Copilot PR review guidance and expectations.
.github/agents/backend-reviewer.agent.md Adds a Go-focused reviewer profile.
.github/agents/frontend-reviewer.agent.md Adds a TS/Next-focused reviewer profile.
.github/agents/security-reviewer.agent.md Adds a security-focused reviewer profile and threat checklist.
.github/agents/test-reliability-reviewer.agent.md Adds a test quality/determinism reviewer profile.
.github/instructions/backend.instructions.md Adds path-scoped Go review rubric.
.github/instructions/frontend.instructions.md Adds path-scoped TS/Next/CSS review rubric.
.github/instructions/security.instructions.md Adds path-scoped security review rubric.
.github/workflows/security.yml Adds caller workflow to run the reusable security scanners on PRs and main pushes.
.github/workflows/security.reusable.yml Implements the reusable security scanning jobs (gitleaks/Trivy/gosec).
.github/workflows/jules-review.yml Adds optional automated Jules PR security review workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +22
uses: ./.github/workflows/security.reusable.yml
secrets: inherit
Comment on lines +12 to +16
permissions:
contents: read
pull-requests: read
security-events: write

Comment on lines +52 to +55
- name: gosec
if: steps.detect.outputs.is_go == 'true'
uses: securego/gosec@master
with:
Comment thread .github/workflows/security.reusable.yml Outdated
Comment on lines +33 to +42
- name: Trivy filesystem scan
uses: aquasecurity/trivy-action@0.28.0
with:
scan-type: fs
scanners: vuln,secret,misconfig
severity: HIGH,CRITICAL
ignore-unfixed: true
format: table
exit-code: '0' # report-only to start; flip to '1' once the baseline is clean

Comment on lines +30 to +35
- name: Jules security review
if: steps.guard.outputs.enabled == 'true'
uses: sanjay3290/jules-pr-reviewer@main
with:
jules-api-key: ${{ secrets.JULES_API_KEY }}
github-token: ${{ github.token }}
@@ -0,0 +1,22 @@
# Copilot review — baseline

You are reviewing a pull request for the Vectorless codebase. Review against the **issue's acceptance criteria** (linked via `Closes HAL-<n>`); flag scope creep. Be concrete: cite `file:line`, explain the risk, propose the fix. Prefer fewer, high-confidence findings over noise.
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from 1d756e1 to ce0b57c Compare June 13, 2026 02:20
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch 5 times, most recently from bfebb81 to 1b93b46 Compare June 15, 2026 11:50
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch 2 times, most recently from a4ef865 to 611db59 Compare June 29, 2026 10:27
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from 611db59 to 83686fd Compare July 6, 2026 07:30
# Local reference — the reusable file is synced into THIS repo too, so each repo
# is self-contained and this works whether dev-standards is public or private.
uses: ./.github/workflows/security.reusable.yml
secrets: inherit
steps:
- uses: actions/checkout@v4
- name: Install Trivy (latest binary — avoids the action's broken setup-trivy pin)
run: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
name: Vulns + misconfig (Trivy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
id: detect
run: |
if ls requirements*.txt pyproject.toml setup.py >/dev/null 2>&1; then echo "is_py=true" >> "$GITHUB_OUTPUT"; else echo "is_py=false" >> "$GITHUB_OUTPUT"; fi
- uses: actions/setup-python@v5
name: Python deps + SAST (pip-audit + bandit)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
name: Secrets (gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Comment thread .github/dependabot.yml
Comment on lines +19 to +24
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
labels: [dependencies, security]
Comment thread .github/dependabot.yml
Comment on lines +12 to +17
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
labels: [dependencies, security]
Comment thread .github/dependabot.yml
Comment on lines +6 to +10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
labels: [dependencies, security]
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch 3 times, most recently from dc14cd0 to 58b3d31 Compare July 13, 2026 08:54
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from 58b3d31 to a5c4207 Compare July 20, 2026 08:44
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from a5c4207 to 0364264 Compare July 27, 2026 09:36
hallelx2 added 5 commits August 3, 2026 09:32
Synced AI-review standards from hallelx2/dev-standards.
…m remote '.github/copilot-instructions.md'

Synced AI-review standards from hallelx2/dev-standards.
…b/agents/'

Synced AI-review standards from hallelx2/dev-standards.
…tions.md' from remote '.github/instructions/backend.instructions.md'

Synced AI-review standards from hallelx2/dev-standards.
…ctions.md' from remote '.github/instructions/frontend.instructions.md'

Synced AI-review standards from hallelx2/dev-standards.
hallelx2 added 5 commits August 3, 2026 09:32
…ctions.md' from remote '.github/instructions/security.instructions.md'

Synced AI-review standards from hallelx2/dev-standards.
… remote '.github/workflows/security.yml'

Synced AI-review standards from hallelx2/dev-standards.
…yml' from remote '.github/workflows/security.reusable.yml'

Synced AI-review standards from hallelx2/dev-standards.
…from remote '.github/workflows/jules-review.yml'

Synced AI-review standards from hallelx2/dev-standards.
…'.github/dependabot.yml'

Synced AI-review standards from hallelx2/dev-standards.
@hallelx2
hallelx2 force-pushed the repo-sync/dev-standards/default branch from 0364264 to fd2db57 Compare August 3, 2026 09:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
AGENTS.md (1)

12-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the completion checks complete and executable.

Line 12 requires build, tests, and lint, but the examples omit lint. Line 24 requires go test -race, but Line 12 lists only go test ./....

Define repository-specific build, test, and lint commands. Include go test -race ./... for Go repositories.

Based on learnings: “Consider work done only after running the real build, tests, and lint checks, including the applicable Go or JavaScript build commands.”

Also applies to: 22-24

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 12, Update the completion-check guidance in AGENTS.md to
define executable repository-specific build, test, and lint commands, including
lint in the JavaScript examples and the applicable JavaScript build commands.
Ensure the Go checks include go build ./..., go test -race ./..., and the
repository’s lint command, keeping the “Done” requirement aligned with the real
build, tests, and lint checks.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/copilot-instructions.md:
- Line 22: Update the guidance in the specialized-review paragraph to state that
path-scoped files in .github/instructions/ apply automatically only when their
applyTo pattern matches, while custom agents in .github/agents/ require explicit
selection or assignment. Remove the claim that specialized agents apply
automatically, and preserve the explicit security-finding guidance.

In @.github/dependabot.yml:
- Around line 5-24: Add a Dependabot update entry for the pip package ecosystem
alongside the existing npm and gomod entries, targeting the repository root and
using the same weekly schedule, pull-request limit, and dependency/security
labels. Configure its directory to match the project’s Python dependency
manifest location.

In @.github/workflows/security.reusable.yml:
- Line 33: Update the Semgrep container image reference in the workflow’s image
configuration to use the reviewed release’s immutable SHA256 digest instead of
the mutable semgrep/semgrep tag.
- Around line 112-125: Update the pip-audit step in the Python-project path to
audit repository manifests rather than only the current environment: run
pip-audit . when pyproject.toml is present, and run pip-audit -r
"$requirements_file" for each matching requirements file. Preserve the existing
Python-project detection condition and keep Bandit under that condition.

In `@AGENTS.md`:
- Around line 32-34: Define one complete AES-256-GCM BYOK standard in AGENTS.md,
including fresh unique nonces per encryption key, authenticated-tag
verification, envelope encryption with managed key storage, key rotation,
tenant-scoped access, and prohibition of plaintext keys in logs, responses, and
client bundles. Mirror the complete rule in .github/copilot-instructions.md,
require nonce uniqueness and key-lifecycle checks in
.github/instructions/security.instructions.md, and update
.github/agents/security-reviewer.agent.md to verify all the same controls.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 12: Update the completion-check guidance in AGENTS.md to define
executable repository-specific build, test, and lint commands, including lint in
the JavaScript examples and the applicable JavaScript build commands. Ensure the
Go checks include go build ./..., go test -race ./..., and the repository’s lint
command, keeping the “Done” requirement aligned with the real build, tests, and
lint checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f1fde29-9b8c-40e7-ba0a-8dc8f4fe8a88

📥 Commits

Reviewing files that changed from the base of the PR and between 99f2f83 and fd2db57.

📒 Files selected for processing (13)
  • .github/agents/backend-reviewer.agent.md
  • .github/agents/frontend-reviewer.agent.md
  • .github/agents/security-reviewer.agent.md
  • .github/agents/test-reliability-reviewer.agent.md
  • .github/copilot-instructions.md
  • .github/dependabot.yml
  • .github/instructions/backend.instructions.md
  • .github/instructions/frontend.instructions.md
  • .github/instructions/security.instructions.md
  • .github/workflows/jules-review.yml
  • .github/workflows/security.reusable.yml
  • .github/workflows/security.yml
  • AGENTS.md

- New dependencies: justified, reputable, no known CVEs.
- Concurrency (Go): data races, unguarded shared state, leaked goroutines.

For deeper, area-specific review, the specialized agents in `.github/agents/` and the path-scoped rubrics in `.github/instructions/` apply automatically. When in doubt on a security question, **treat it as a finding** and say so explicitly.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== candidate files =="
git ls-files | rg '(^|/)(copilot-instructions\.md|agents|instructions)' || true

echo
echo "== .github/copilot-instructions.md =="
if [ -f .github/copilot-instructions.md ]; then
  nl -ba .github/copilot-instructions.md | sed -n '1,120p'
fi

echo
echo "== .github/agents =="
if [ -d .github/agents ]; then
  find .github/agents -maxdepth 3 -type f -print | sort | while read -r f; do
    echo "--- $f"
    nl -ba "$f" | sed -n '1,160p'
  done
fi

echo
echo "== .github/instructions =="
if [ -d .github/instructions ]; then
  find .github/instructions -maxdepth 3 -type f -print | sort | while read -r f; do
    echo "--- $f"
    nl -ba "$f" | sed -n '1,160p'
  done
fi

Repository: hallelx2/pdftable

Length of output: 601


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .github/copilot-instructions.md =="
if [ -f .github/copilot-instructions.md ]; then
  awk '{printf "%6d  %s\n", NR, $0}' .github/copilot-instructions.md | sed -n '1,120p'
fi

echo
echo "== custom agent files =="
for f in .github/agents/*.agent.md; do
  [ -f "$f" ] || continue
  echo "--- $f"
  awk '{printf "%6d  %s\n", NR, $0}' "$f" | sed -n '1,180p'
done

echo
echo "== instruction files =="
for f in .github/instructions/*.instructions.md; do
  [ -f "$f" ] || continue
  echo "--- $f"
  awk '{printf "%6d  %s\n", NR, $0}' "$f" | sed -n '1,160p'
done

Repository: hallelx2/pdftable

Length of output: 11865


🌐 Web query:

GitHub Copilot custom agents applyTo path-specific instruction files automatic selection documentation

💡 Result:

In GitHub Copilot, path-specific instruction files are configured using *.instructions.md files, which allow you to define instructions that are applied automatically based on the files or directories currently being accessed [1][2][3]. Key details for implementation include: 1. Storage Location: These files should be stored within or below the .github/instructions directory in your repository [1][4][5]. 2. Configuration: Each .instructions.md file must include a YAML frontmatter block at the start of the file that defines the applyTo property [1][3]. This property uses glob syntax to determine which files the instructions apply to [1][2][3]. Example configuration: --- applyTo: "app/models//*.rb" --- 3. Automatic Selection: GitHub Copilot automatically selects and applies these instructions when the path of the file being worked on matches the glob pattern specified in the applyTo field [1][3]. If no applyTo property is defined, the instructions will not be applied automatically, though they may still be available for manual selection in some interfaces [3]. 4. Multiple Patterns: You can specify multiple patterns within the applyTo field by separating them with commas (e.g., applyTo: "/*.ts,/*.tsx") [1][2]. 5. Scope and Precedence: When a path matches, these path-specific instructions are used alongside repository-wide custom instructions (defined in .github/copilot-instructions.md) if they exist [1][5]. You can verify which instructions were applied by checking the References section of a Copilot chat response [3]. This functionality is supported in various Copilot features, including Copilot Chat in IDEs like Visual Studio Code and Visual Studio, as well as the Copilot cloud agent [4][6]. While custom agents (defined in files like AGENTS.md) and path-specific instructions both serve to customize behavior, they are distinct mechanisms; custom agents define broader agent profiles, whereas *.instructions.md files provide targeted, file-context-aware instructions [4][5][7].

Citations:


🌐 Web query:

GitHub Copilot custom agents *.agent.md automatic selection agents panel profile selection applyTo instructions

💡 Result:

GitHub Copilot custom agents are defined using Markdown files with the .agent.md extension [1][2]. These files use YAML frontmatter to configure the agent's identity, behavioral instructions, and capabilities [3][4]. Automatic Selection and the Agents Panel GitHub Copilot can automatically select and use a custom agent based on the task context [5]. Key configuration properties in the .agent.md file control this behavior: - disable-model-invocation: If set to true, this prevents Copilot from automatically using the agent based on task context; the agent must then be selected manually [5]. - user-invocable: If set to false, the agent cannot be manually selected by a user and is restricted to programmatic access [5]. - infer (Retired): Previously used to control automatic selection; it is now recommended to use disable-model-invocation and user-invocable instead [5]. In IDEs and GitHub interfaces, users can typically select agents manually from an agents panel, dropdown, or tab when initiating a new session [6][7][8]. Instructions and applyTo While custom agents use .agent.md files for their core definition [1][4], separate instruction files often use the *.instructions.md format [9][10]. These instruction files utilize the applyTo property to manage scope [9][11]: - applyTo: This property accepts glob patterns to specify which files or directories the instructions apply to [9][11][10]. For example, applyTo: "/*.ts" would apply the instructions to all TypeScript files [11][10]. If this property is omitted, the instructions may not be applied automatically [9]. - Custom Agent Instructions: Within an .agent.md file, the behavioral instructions are defined in the Markdown content below the YAML frontmatter [4][12]. These instructions guide the agent's expertise, constraints, and behavior during its execution [4][2]. In summary, .agent.md files define the custom agent itself, while *.instructions.md files are often used for repository-wide or path-specific behavioral rules governed by the applyTo property [9][13][10].

Citations:


Do not claim that custom agents apply automatically.

Path-specific .github/instructions/ files apply automatically when applyTo matches. Custom agents in .github/agents/ require explicit selection or assignment; do not present them as already running.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: The official name of this software platform is spelled with a capital “H”.
Context: ...cific review, the specialized agents in .github/agents/ and the path-scoped rubrics in...

(GITHUB)


[uncategorized] ~22-~22: The official name of this software platform is spelled with a capital “H”.
Context: ...agents/and the path-scoped rubrics in.github/instructions/` apply automatically. Whe...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/copilot-instructions.md at line 22, Update the guidance in the
specialized-review paragraph to state that path-scoped files in
.github/instructions/ apply automatically only when their applyTo pattern
matches, while custom agents in .github/agents/ require explicit selection or
assignment. Remove the claim that specialized agents apply automatically, and
preserve the explicit security-finding guidance.

Comment thread .github/dependabot.yml
Comment on lines +5 to +24
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
labels: [dependencies, security]

- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
labels: [dependencies, security]

- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
labels: [dependencies, security]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Tracked files relevant to Dependabot/workflows:\n'
git ls-files | rg '(^|/)\.github/(dependabot\.yml|workflows/|pyproject\.toml|requirements|setup\.py|poetry\.lock|Pipfile\.lock)' || true

printf '\nCurrent .github/dependabot.yml:\n'
cat -n .github/dependabot.yml

printf '\nSearch for python dependency scanning declarations:\n'
rg -n "python|pip|safety|bandit|security|oss-supplier|dependency|dependabot|package-ecosystem" .github -S || true

printf '\nSearch for pip ecosystems in dependabot files:\n'
rg -n "package-ecosystem:\s*(pip|poetry|requirements)" .github || true

Repository: hallelx2/pdftable

Length of output: 7039


🌐 Web query:

GitHub Dependabot package-ecosystem pip depends on requirements.txt setup.py pyproject.toml

💡 Result:

To configure Dependabot to monitor your Python dependency files, use the pip package ecosystem in your .github/dependabot.yml file [1][2][3]. Dependabot supports requirements.txt, setup.py, and pyproject.toml files under this single ecosystem [4][5][6]. Configuration Details: - Ecosystem Name: Use package-ecosystem: "pip" [1][2][6]. - File Support: Dependabot monitors requirements.txt (any .txt file), setup.py, and pyproject.toml (if it follows PEP 621) when configured with the pip ecosystem [5][6]. It also supports related files like setup.cfg [5]. - Directory Configuration: Specify the directory where these files are located (e.g., directory: "/") [3]. To ensure Dependabot scans nested directories, you can use patterns like directory: "//*" [7]. Common Setup: A standard dependabot.yml configuration for a Python project typically looks like this [3]: version: 2 updates: - package-ecosystem: "pip" directory: "/" schedule: interval: "weekly" Important Considerations: - Grouped Updates: If you have multiple dependency files (e.g., both a pyproject.toml and a requirements.txt) and want them updated together, you may need to use Dependabot's grouping feature to prevent separate, uncoordinated pull requests [7][4]. - Limitations: Dependabot's ability to keep requirements.txt files synchronized with pyproject.toml changes—especially if the requirements file is generated by an external tool like pip-compile—can vary [8][9]. In some cases, Dependabot may update the pyproject.toml but not the associated requirements.txt if the relationship between the two is not natively recognized by its update logic [9]. If you rely on external tools to sync these files, you may need to manage those updates outside of standard Dependabot version updates or ensure the files are in locations Dependabot consistently crawls [7][9].

Citations:


🌐 Web query:

site:docs.github.com/dependabot/generate-dependabot.yml gomod npm pip

💡 Result:

Use these package-ecosystem values in .github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: "gomod"
    directory: "/"
    schedule:
      interval: "weekly"

  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"

  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "weekly"

gomod is for Go modules; npm covers npm, Yarn, and pnpm; pip also covers pipenv and Poetry projects. [1][2]


Add pip updates to Dependabot.

Dependabot supports package-ecosystem: pip for Python requirement files, and target repositories synced to this config will not get Python update PRs without it. Add the same format as the existing npm/gomod update entries, with dependency manifest support matching the project.

🧰 Tools
🪛 GitHub Check: Semgrep OSS

[warning] 19-24: Semgrep Finding: package_managers.dependabot.dependabot-missing-cooldown.dependabot-missing-cooldown
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a cooldown block with default-days: 7 to each package-ecosystem entry under updates to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown


[warning] 12-17: Semgrep Finding: package_managers.dependabot.dependabot-missing-cooldown.dependabot-missing-cooldown
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a cooldown block with default-days: 7 to each package-ecosystem entry under updates to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown


[warning] 6-10: Semgrep Finding: package_managers.dependabot.dependabot-missing-cooldown.dependabot-missing-cooldown
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a cooldown block with default-days: 7 to each package-ecosystem entry under updates to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/dependabot.yml around lines 5 - 24, Add a Dependabot update entry
for the pip package ecosystem alongside the existing npm and gomod entries,
targeting the repository root and using the same weekly schedule, pull-request
limit, and dependency/security labels. Configure its directory to match the
project’s Python dependency manifest location.

name: SAST — OWASP Top 10 + CWE Top 25 (Semgrep)
runs-on: ubuntu-latest
container:
image: semgrep/semgrep

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Tracked workflow file location:"
git ls-files .github/workflows/security*

echo
echo "Relevant workflow content:"
if [ -f .github/workflows/security.reusable.yml ]; then
  nl -ba .github/workflows/security.reusable.yml | sed -n '1,120p'
fi

echo
echo "Search for Semgrep image references:"
rg -n "semgrep/semgrep|image: " .github/workflows/security.reusable.yml || true

Repository: hallelx2/pdftable

Length of output: 327


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Relevant workflow snippets:"
awk '{printf "%8d  %s\n", NR, $0}' .github/workflows/security.reusable.yml | sed -n '1,120p'

echo
echo "Semgrep image references in workflow:"
grep -n "semgrep/semgrep\|image:" .github/workflows/security.reusable.yml || true

echo
echo "Check whether image reference has a digest:"
python3 - <<'PY'
from pathlib import Path
for line in Path(".github/workflows/security.reusable.yml").read_text().splitlines():
    stripped = line.strip()
    if stripped.startswith("image:") or stripped.startswith("image= "):
        value = stripped.split("=", 1)[1] if "=" in stripped else stripped.split(None, 1)[1]
        print(value, "has_digest:", "@" in value.split()[0])
PY

Repository: hallelx2/pdftable

Length of output: 5446


Pin the Semgrep container image to its SHA256 digest.

semgrep/semgrep is mutable by tag. A SHA256 digest can identify the reviewed Semgrep release as fixed image content.

Proposed fix
-      image: semgrep/semgrep
+      image: semgrep/semgrep@sha256:<reviewed-image-digest>
🧰 Tools
🪛 zizmor (1.28.0)

[error] 33-33: unpinned image references (unpinned-images): container image is unpinned

(unpinned-images)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/security.reusable.yml at line 33, Update the Semgrep
container image reference in the workflow’s image configuration to use the
reviewed release’s immutable SHA256 digest instead of the mutable
semgrep/semgrep tag.

Source: Linters/SAST tools

Comment on lines +112 to +125
- name: Detect Python project
id: detect
run: |
if ls requirements*.txt pyproject.toml setup.py >/dev/null 2>&1; then echo "is_py=true" >> "$GITHUB_OUTPUT"; else echo "is_py=false" >> "$GITHUB_OUTPUT"; fi
- uses: actions/setup-python@v5
if: steps.detect.outputs.is_py == 'true'
with:
python-version: '3.x'
- name: pip-audit (CVEs) + bandit (SAST)
if: steps.detect.outputs.is_py == 'true'
run: |
pip install --quiet pip-audit bandit
pip-audit || true
bandit -r . -ll || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- workflow excerpt ---\n'
sed -n '90,140p' .github/workflows/security.reusable.yml 2>/dev/null || true

printf '\n--- pip-auss usages ---\n'
rg -n "pip-audit|projects_file|requirement|dependencies_file|bandit" .github/workflows || true

printf '\n--- repository manifest files ---\n'
git ls-files | rg '(^|/)(requirements[^[:space:]]*\.txt|pyproject\.toml|setup\.py|setup\.cfg|Pipfile|poetry\.lock|uv\.lock|Pipfile\.lock)$' || true

Repository: hallelx2/pdftable

Length of output: 246


🌐 Web query:

pip-audit command line documentation pip-audit . local project pyproject.toml requirements.txt default behavior no arguments

💡 Result:

The pip-audit tool is a vulnerability scanner for Python projects that audits dependencies against known vulnerabilities [1][2]. Its behavior depends on the arguments provided or the presence of a specific project path [3][4]. Default Behavior (No Arguments) When run without any arguments (pip-audit), the tool defaults to auditing the current active Python environment [3][5]. It inspects the installed packages in the environment and checks them against vulnerability databases [2]. Auditing Requirements Files To audit specific dependency files, use the -r or --requirement flag [3][4]. This flag can be used multiple times to audit multiple files (e.g., pip-audit -r requirements.txt -r dev-requirements.txt) [3][4]. pip-audit supports scanning requirements.txt files [4][2]. Auditing Local Projects You can audit a local project by providing its path as a positional argument [3]. When a project path is provided, pip-audit searches for specific "project" files, such as pyproject.toml [4]. Key Flags and Options -l, --local: Limits the audit to dependencies installed in the local environment, excluding globally installed packages if applicable [3][4]. --locked: Used when auditing from a project path to specifically audit lock files (currently supporting formats like pylock.*.toml) [3][4]. -f FORMAT, --format FORMAT: Specifies the output format (e.g., columns, json, cyclonedx-json, cyclonedx-xml, markdown) [6][3]. -s SERVICE, --vulnerability-service SERVICE: Selects the vulnerability service to use (options include osv, pypi, esms) [6][3]. -S, --strict: Causes the audit to fail if dependency collection fails for any dependency [6][3]. For detailed usage information, you can run pip-audit --help in your terminal [3][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow excerpt ---'
sed -n '90,145p' .github/workflows/security.reusable.yml

printf '%s\n' ''
printf '%s\n' '--- pip-audit/bandit usages ---'
rg -n "pip-audit|requirement|dependencies_file|bandit" .github/workflows || true

printf '%s\n' ''
printf '%s\n' '--- repository manifest files ---'
git ls-files | rg '(^|/)(requirements[^[:space:]]*\.txt|pyproject\.toml|setup\.py|setup\.cfg|Pipfile|poetry\.lock|uv\.lock|Pipfile\.lock)$' || true

Repository: hallelx2/pdftable

Length of output: 3007


Audit the repository dependency manifests.

pip-audit without an argument scans the current Python environment. This job only installs the audit tools, so repository dependencies are not scanned. Use pip-audit . for supported pyproject.toml projects and pip-audit -r "$requirements_file" for each requirements file. Keep Bandit under the existing Python-project detection condition.

🧰 Tools
🪛 GitHub Check: Semgrep OSS

[warning] 116-116: Semgrep Finding: yaml.github-actions.security.github-actions-mutable-action-tag.github-actions-mutable-action-tag
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/security.reusable.yml around lines 112 - 125, Update the
pip-audit step in the Python-project path to audit repository manifests rather
than only the current environment: run pip-audit . when pyproject.toml is
present, and run pip-audit -r "$requirements_file" for each matching
requirements file. Preserve the existing Python-project detection condition and
keep Bandit under that condition.

Comment thread AGENTS.md
Comment on lines +32 to +34
## Security must-haves (Vectorless-specific)
- **BYOK keys**: encrypted at rest (AES-256-GCM), never logged, never returned in responses.
- **Multi-tenant**: every query/store access scoped to the caller's org/tenant — no cross-tenant reads or writes. This is the #1 risk in `vectorless-control-plane`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Use one complete BYOK encryption standard in every synchronized file.

All four locations require AES-256-GCM but do not consistently state the nonce and key-lifecycle requirements. Add one shared rule that requires:

  • A fresh, unique nonce for every encryption under a key.
  • Authenticated-tag verification.
  • Envelope encryption with managed key storage.
  • Key rotation and tenant-scoped access.
  • No plaintext keys in logs, responses, or client bundles.

GCM IV reuse can invalidate confidentiality and authentication guarantees. (nvlpubs.nist.gov)

  • AGENTS.md#L32-L34: define the complete repository standard.
  • .github/copilot-instructions.md#L15-L18: mirror the complete BYOK rule.
  • .github/instructions/security.instructions.md#L8-L10: require nonce uniqueness and key lifecycle checks.
  • .github/agents/security-reviewer.agent.md#L13-L16: make the security agent verify the same controls.
📍 Affects 4 files
  • AGENTS.md#L32-L34 (this comment)
  • .github/copilot-instructions.md#L15-L18
  • .github/instructions/security.instructions.md#L8-L10
  • .github/agents/security-reviewer.agent.md#L13-L16
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 32 - 34, Define one complete AES-256-GCM BYOK
standard in AGENTS.md, including fresh unique nonces per encryption key,
authenticated-tag verification, envelope encryption with managed key storage,
key rotation, tenant-scoped access, and prohibition of plaintext keys in logs,
responses, and client bundles. Mirror the complete rule in
.github/copilot-instructions.md, require nonce uniqueness and key-lifecycle
checks in .github/instructions/security.instructions.md, and update
.github/agents/security-reviewer.agent.md to verify all the same controls.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants